package com.tw.management.entity;

import java.io.Serializable;

import org.apache.commons.lang3.builder.ToStringBuilder;

import com.tw.management.entity.common.AbstractEntity;

/**
 * 
 * @author Tangw
 * @version 1.0
 *
 */
public class Permission extends AbstractEntity implements Serializable {

	private static final long serialVersionUID = -8886630771463989508L;

	private String permission; // 权限标识 程序中判断使用,如"user:create"

	private String description; // 权限描述,UI界面显示使用

	private Boolean available = Boolean.FALSE; // 是否可用,如果不可用将不能添加

	// ----------------------------------------------//

	public Permission() {
		super();
	}

	public Permission(String permission, String description, Boolean available) {
		super();
		this.permission = permission;
		this.description = description;
		this.available = available;
	}

	public String getPermission() {
		return permission;
	}

	public void setPermission(String permission) {
		this.permission = permission;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Boolean getAvailable() {
		return available;
	}

	public void setAvailable(Boolean available) {
		this.available = available;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

}
